#Rem
header: AGFX TILED rendfering layer orders
#End
Strict
Import mojo
Import agfx

#Rem
	summary: layer flag for tileset layer type
#End
Const P2D_LAYER_TYPE_TILESET:Int = 0
#Rem
	summary: layer flag for objects group layer type
#End
Const P2D_LAYER_TYPE_OBJECTS:Int = 1

#Rem
	summary: order item
	- define type of layer and ID 
#End
Class TRenderOrder
	Field type:Int
	Field id:Int
	
	#Rem
	summary: constructor
	t:Int	- type of layer
	i:Int	- layer id 
	#End	
	Method New(t:Int,i:Int)
		Self.type = t
		Self.id = i
	End Method
End Class

#Rem
	summary: TPlaform2d_RenderOrder
#End
Class TTiled_RenderOrder

	#Rem
	summary: list of rendered layers
	#End
	Field orders:ArrayList<TRenderOrder>
	
	#Rem
	summary: constructor
	#End
	Method New()
		Self.orders = New ArrayList<TRenderOrder>()
	End Method
	
	#Rem
	summary: add layer type and ID to list
	#End
	Method Add:Void(t:Int,i:Int)
		Self.orders.AddLast(New TRenderOrder(t,i))
	End Method
End Class